home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: uu4news.netcom.com!zodiac!szh
- From: szh@zcon.com (Syed Zaeem Hosain)
- Subject: Re: extern func() declaration?
- Message-ID: <1996Apr6.164517.26340@zcon.com>
- Sender: szh@zcon.com (Syed Zaeem Hosain)
- Nntp-Posting-Host: zodiac
- Reply-To: szh@zcon.com
- Organization: Z Consulting Group
- References: <316436C5.413E@micromedia.on.ca>
- Date: Sat, 6 Apr 1996 16:45:17 GMT
-
- In article <316436C5.413E@micromedia.on.ca>, Richard Steadman <rsteadma@micromedia.on.ca> writes:
- >Hello. This is just a minor point, but I couldn't find the
- >answer in the FAQ:
- >
- >What's the difference between
- >
- > extern int func(void);
- >
- >and
- >
- > int func(void);
- >
- >when declaring functions located in another source file? They
- >both seem to work alright.
-
- There is no difference. For such function declarations (note this
- proviso carefully ... because there *can* be a difference for
- variables!), the function declaration shown above without "extern" in
- front, defaults to being extern for final linking. This is normal.
-
- Z
-
-
- --
- -------------------------------------------------------------------------
- | Syed Zaeem Hosain P. O. Box 610097 (408) 441-7021 |
- | Z Consulting Group San Jose, CA 95161 szh@zcon.com |
- -------------------------------------------------------------------------
-